<template>
	<view class="collectProgramme">
		<view class="active">
			<view class="activeList"  v-for="(val,i) in list" :key='i' @tap="getnav(router(`programmeDetail?id=${val.project.id}`))" >
				<image :src="val.project.cover" mode=""></image>
				<view class="line2 describe">{{val.project.title}}</view>
				<view class="priceBox">
					<text class="price">{{val.project.deposit}}</text>
					<text class="word">预估费用</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:[],
			}
		},
		onLoad() {
			this.getlist()
		},
		methods: {
			getlist(){
				let token = uni.getStorageSync('userinfo').token
				let user_id = uni.getStorageSync('userinfo').id
				this.http('/api/collect/index', 'post', {user_id,token})
				.then((res)=>{
					this.list=res.data.data
					console.log(this.list)
				})
			}
		}
	}
</script>

<style lang="less">
	.collectProgramme{
		padding: 0 40rpx;
		.active{
			display: flex;
			align-items: center;
			justify-content: space-between;
			flex-wrap: wrap;
			.activeList{
				width: 320rpx;
				margin-top: 32rpx;
				image{
					width: 100%;
					height: 320rpx;
					border-radius: 20rpx;
				}
				.describe{
					font-size: 24rpx;
					padding-top: 10rpx;
				}
				.priceBox{
					margin-top: 25rpx;
					display: flex;
					align-items: center;
					.price{
						color: #FE7203;
						&::before{
							padding-right: 10rpx;
						}
					}
					.word{
						font-size: 20rpx;
						color: #BEC9D7;
						padding-left: 10rpx;
					}
				}
			}
		}
	}
</style>
